#include "path.h"

#include <list>
#include <iostream>
Path::Path()
{
}
void Path::add(Cell *cell){
    cells.push_back(cell);

}

void Path::printPath(){
    std::cout << "path("<<cells.size()<<"):";
    std::list<Cell*>::iterator it;

    for (it=cells.begin(); it!=cells.end(); ++it){
       (*it)->printCell();
       std::cout<<" ";
    }
    std::cout<<std::endl;

}
std::list<Cell*>::iterator Path::begin(){
    return cells.begin();
}
std::list<Cell*>::iterator Path::end(){
    return cells.end();
}

void Path::popFirst(){
    cells.pop_front();
}
int Path::size(){
    return cells.size();
}

bool Path::isEmpty(){
    return cells.size()==0;
}

Cell* Path::first(){
    return cells.front();
}

Cell* Path::last(){
    return cells.back();
}
